from selenium import webdriver
from selenium.webdriver.common.by import By
import time

driver = webdriver.Chrome()
driver.get("D:/xysf/Pythonwlpcjcjc/code/5/jingdaokuang.html")
driver.maximize_window()

element = driver.find_element(By.TAG_NAME,'button').click()
alert = driver.switch_to.alert

time.sleep(1)
alert.accept()


